<%@ page contentType="text/html; charset=UTF-8" language="java"%>
<%@ page import="com.hzqy.commons.utils.ConstantUtils" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>内容详情</title>
<link rel="stylesheet" type="text/css"	href="../../static/js/themes/defalut.css">
<link rel="stylesheet" type="text/css"	href="../../static/js/themes/public.css">
<link rel="stylesheet" type="text/css"	href="../../static/js/themes/ddspstyle.css">
<link rel="stylesheet" type="text/css"	href="../../static/js/themes/default/easyui.css">
<link rel="stylesheet" type="text/css"	href="../../static/js/themes/icon.css">
<link rel="stylesheet" type="text/css"	href="../../static/js/WdatePicker/skin/WdatePicker.css">
<script type="text/javascript" src="../../static/js/jquery.min.js"></script>
<script type="text/javascript" src="../../static/js/jquery.easyui.min.js"></script>
<script type="text/javascript"	src="../../static/js/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="../../static/js/jquery.validate.js"></script>
<script type="text/javascript" src="../../static/js/index.js"></script>
<script type="text/javascript" src="../../static/js/WdatePicker/WdatePicker.js"></script>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<%
	String para =request.getParameter("f_cc_id");
	int f_cc_id = 0;
	if(para != null)
		f_cc_id = Integer.valueOf(para);
	String myIp = session.getServletContext().getInitParameter("img_url");
	String []nonceObj=ConstantUtils.getNonceObject();
%>
<script type="text/javascript">
	$(function() {
		var f_cc_id = <%=f_cc_id%>;
		$("#f_cc_id").val(f_cc_id);
		//获取内容信息
		$.ajax({
			url: "select_user_content.do?f_cc_id=" + f_cc_id,
			success: function (data) {
				data = JSON.parse(data);
				$("#user_name").html(data.user_name);
				$("#sex").html(data.sex);
				$("#home_name").html(data.home_name);
				$("#age").html(data.age);
				if (data.open_send_food_service == 0) {
					status = "开通";
				} else if (data.open_send_food_service == 1) {
					status = "未开通";
				}

				if (data.apply_status == 0) {
					apply_status = "未申请";
				} else if (data.apply_status == 1) {
					apply_status = "审核中";
				} else if (data.apply_status == 2) {
					apply_status = "审核通过";
				} else if (data.apply_status == 3) {
					apply_status = "拒绝";
				}
				$("#address").html(data.address);

				$("#idcard").html(data.idcard);

				var value = data.f_cc_medioType;

				$("#open_send_food_service").html(status);
				$("#com_name").html(data.com_name);
				$("#apply_status").html(apply_status);
				if (data.f_yh_status == 2 || data.f_yh_status == 4) {
					$("#radio1").val(16);
				}
				if (data.f_yh_status == 16 || data.f_yh_status == 13) {
					$("#radio1").val(1);
					$("#radio2").val(13);
				}


			}
		});

		/*//获取内容绑定的分类信息
		$.ajax({
			url:'../../content/select_contentBindCatalog.do?f_cc_id='+f_cc_id,
			success:function(data){
				data = JSON.parse(data);
				var str = "";
				for(var i=0;i<data.length;i++) {
					str+=data[i].f_catalog_name+",";
				}
				if(!str=="")
					str =str.substring(0, str.length-1);
				$("#bindCatalog").html(str);
			}
		});*/
	});

		function _submitFm() {
			app_ajax('../../content/review_user_content.do', $("#contentForm").serialize(), function (data) {
				if (data.success) {
					$.messager.progress('close');
					$.messager.alert('提示', '审核成功！', 'info', function () {
						parent.$('#dlg').dialog('close');
						parent.gotoSearch($('#easyui-treegrid'));
					});
				} else {
					$.messager.alert('提示', data.result, 'info', function () {
						$.messager.progress('close');
					});
				}
			});
		}

	
</script>
</head>

<body class="overfwidth">
	<div class="barnavtop">您所在的位置：内容管理 &gt; 内容审核</div>
	<div id="workspace">
		<!--主体 开始-->
		<div id="container">
			<div class="editspace">
				<form id="contentForm" class="cmxform" enctype="multipart/form-data" name="formName">
					<input type="hidden" id="f_cc_id" name="f_cc_id" value="" />
					<input type="hidden" id="sourceFlag" name="sourceFlag" value="5"/>
					<legend>内容审核</legend>
					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="10%" align="left">
										用户名称:
										<font id="user_name" style="width: 150px;"></font>
									</td>
									<td width="10%" align="left">
										雨花家园名称:
										<font id="home_name" style="width: 150px;"></font>
									</td>
								</tr>
							</table>
						</div>
					</fieldset>

					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="10%" align="left">
										社区id:
										<font id="community_id" style="width: 150px;"></font>
									</td>
									<td width="10%" align="left">
										社区名称:
										<font id="com_name" style="width: 150px;"></font>
									</td>
								</tr>
							</table>
						</div>
					</fieldset>
					
						<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="20%" align="left">
										送餐服务:
									</td>
									<td width="30%">
										<font id="open_send_food_service" style="width: 150px;"></font>
									</td>
									<td class="hide-item" width="20%" align="left">
										申请状态:
									</td>
									<td class="hide-item" width="30%">
										<font id="apply_status" style="width: 150px;"></font>
									</td>
								</tr>
							</table>
						</div>
					</fieldset>

					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="20%" align="left">
										家庭地址:
									</td>
									<td width="30%">
										<font id="address" style="width: 150px;"></font>
									</td>
									<td class="hide-item" width="20%" align="left">
										身份证号:
									</td>
									<td class="hide-item" width="30%">
										<font id="idcard" style="width: 150px;"></font>
									</td>
								</tr>
							</table>
						</div>
					</fieldset>
					
					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="10%" align="left">
										<jsp:include page="../../pictures/pictures_info_yhz.jsp" flush="true">
											<jsp:param value="<%=f_cc_id %>" name="f_cp_relationid"/>
										</jsp:include>
									</td>
								</tr>
							</table>
						</div>
					</fieldset>
					
					<fieldset>
						<div class="fitem">
							<table width="100%" border="0" cellpadding="0" cellspacing="0">
								<tr>
									<td width="10%" align="left">内容审核:</td>
									<td>
										<input type="radio" id="radio1" checked="true" name="f_yh_status" value="1">上线</input>
										<input type="radio" id="radio2" name="f_yh_status" value="4">审核不通过</input>
									</td>
								</tr>
							</table>
						</div>
					</fieldset>

					
					<input type="hidden" name="stime" value="<%=nonceObj[0]%>"/>
					<input type="hidden" name="sign" value="<%=nonceObj[1]%>"/>
				</form>
			</div>
			<div class="toolbar" style="text-align: center;">
				<a class="easyui-linkbutton" data-options="iconCls:'icon-ok'"
					href="javascript:void(0);" onclick="_submitFm()">保存</a> <a
					href="javascript:void(0);" data-options="iconCls:'icon-cancel'"
					class="easyui-linkbutton"
					onclick="javascript:parent.$('#dlg').dialog('close')">取消</a>
			</div>
		</div>
		<!--主体 结束-->
	</div>
</body>
</html>
